@using VocaDb.Model.Utils;
@using Res = ViewRes.User.LoginStrings;
@inherits VocaDb.Web.Code.VocaDbPage<VocaDb.Web.Models.LoginModel>

@{
	PageProperties.Title = Res.Login;
}

@Helpers.ValidationSymmaryDiv(Res.UnableToLogin)

<form action="@VocaUriBuilder.Absolute(Url.Action("Login", "User"))" method="POST">
	@Html.HiddenFor(m => m.ReturnToMainSite)
	@Html.HiddenFor(m => m.ReturnUrl)

	<div>
		<div class="editor-label">
			@Html.LabelFor(m => m.UserName)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(m => m.UserName)
			@Html.ValidationMessageFor(m => m.UserName)
		</div>

		<div class="editor-label">
			@Html.LabelFor(m => m.Password)
		</div>
		<div class="editor-field">
			@Html.PasswordFor(m => m.Password)
			@Html.ValidationMessageFor(m => m.Password)
		</div>

		<br />
		<label class="checkbox">
			@Html.CheckBoxFor(m => m.KeepLoggedIn)
			@Res.KeepMeLoggedIn
		</label>
		<br />

		<p>
			<button type="submit" class="btn btn-primary">@Res.DoLogin</button>
		</p>
		
	</div>

</form>

@Res.NoAccount @Html.ActionLink(Res.RegisterHere, "Create")@ViewRes.SharedStrings.Period<br />

@Res.ForgotPassword @Html.ActionLink(Res.ResetPass, "ForgotPassword")@ViewRes.SharedStrings.Period<br />

<br />
<hr />
<a href="@Url.Action("LoginTwitter", new { returnUrl = Model.ReturnUrl })">
	<img src="@Url.Content("~/Content/Sign-in-with-Twitter-darker.png")" alt="@Res.LoginWithTwitter" />
</a>